<!DOCTYPE html>
<html>

	<head>
		<meta charset="UTF-8">
		<title></title>
		<script src="js/jquery-1.12.4.min.js" type="text/javascript" charset="utf-8"></script>
		<style type="text/css">
			/*
			 checked  表示选中选择器
			 * */
			
			input:checked {
				width: 30px;
				height: 30px;
			}
		</style>
	</head>

	<body>
		<input type="text" />
		<sub>提交按钮</sub>
		<h1>请输入内容：</h1>
		<b>我是第一个b标签</b><br />
		<b>我是第二个b标签</b><br />
		<b>我是第三个b标签</b><br />
		<b>我是第四个b标签</b><br />
		<input type="radio" name="sex" checked="checked" />男
		<input type="radio" name="sex" />女
		<input type="checkbox" checked="checked" />游泳
		<input type="checkbox" />画画
	</body>
	<script type="text/javascript">
		$("#txt").keyup(function(c) {
			if(c.keyCode == 13) {
				console.log("敲击了回车按键")
			}
		})
		$("#txt").focus(function() {
			console.log("得到了焦点")
		})
		$("#txt").blur(function() {
			console.log("失去焦点")
		})
		$("h1").siblings("b").css("color", "blue")
		// 如果有多组属性需要修改，要用{;},每组之间用“，”号隔开
		$("sub").siblings("b").css({
			"color": "red",
			"font-size": "30px"
		})
		var retel = new RegExp("^1[356789]\\d{9}$")
		var tel1 = 12222222222222
		var tel2 = 13145674567
		console.log(retel.test(tel1))
		console.log(retel.test(tel2))
		var retel2 = /^1[356789]\d{9}$/
		var retel3 = /\d+/
		var tel3 = '13145671235'
		var tel4 = '122121212121'
		console.log(retel2.test(tel3))
		console.log(retel3.test(tel4))
		var sTr01 = '123456asdf';
		var re01 = /\d+/;
		//匹配纯数字字符串
		var re02 = /^\d+$/;
		alert(re01.test(sTr01)); //弹出true
		alert(re02.test(sTr01)); //弹出false
	</script>

</html>